package club.zhangliyuanblog.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author liyuan.zhang
 * @date 2021/4/17 18:12
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    // @LoadBalanced //赋予resttemplate负载均衡的能力
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
